/**
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-11-24 22:18:21
 * Copyright (c) 2015- joysuch-版权所有
 */

package com.joysuch.wwyt.risk.service;

import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.risk.EvaluationPlanStrategies;
import com.joysuch.wwyt.risk.bean.*;
import com.joysuch.wwyt.risk.entity.RiskDistrict;
import com.joysuch.wwyt.risk.entity.RiskEvaluationPlan;
import com.joysuch.wwyt.risk.entity.RiskPoint;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Date;
import java.util.List;

public interface RiskEvaluationPlanService {

    public void add(RiskEvaluationPlan entity) throws Exception;

    void update(RiskEvaluationPlan entity) throws Exception;

    Page<RiskEvaluationPlan> findByPage(Pageable page);

    void delete(Long id);

    void deleteByRiskPointId(Long riskPointId);

    RiskEvaluationPlan findById(Long id);

    /**
     * 查询控制风险计划列表
     *
     * @param page
     *            分页参数
     * @param condition
     *            搜索条件
     * @return 分页数据
     */
    public Page<RiskEvaluationPlanControlListBean> findByPage(Pageable page,
                                                              RiskEvaluationPlanControlListSearchBean condition);

    public void batchMakePlan(List<Long> riskPointIdList, EvaluationPlanStrategies strategies, Date evaluationTime, Integer versionFlag);

    public Page<RiskEvaluationPlanStableListBean> findDistrictStableRiskByPage(Pageable page,
                                                                               RiskEvaluationPlanStableListSearchBean condition);

    public void batchMakeDistrictStableRiskPlan(List<Long> riskPointIdList, EvaluationPlanStrategies strategies,
                                                Date evaluationTime,Integer versionFlag);

    void list(Pageable page, RiskEvaluationPlanControlListSearchBean condition) throws Exception;

    void print(Pageable pageable);

    ResultBean remindSettingSave(Integer flag, RiskEvalPlanRemindBean bean);

    ResultBean remindSettingGet(Integer flag);

    void districtReCal(RiskDistrict district, Date evaluationTime,Integer versionFlag);

    void riskPointReCal(RiskPoint riskPoint, Date evaluationTime,Integer versionFlag);

    int riskPointBatchReCal(List<RiskPointBatchEvaluationBean> batchEvaluations);

    void batchSendEvaluationRemind(Long districtId, String districtName, Integer versionFlag);

}
